<?php
namespace model;
use \model\model_m;
class loginlog_m extends model_m{
	public function __construct(){
			$this->table='loginlog';
	}
	public function s_all_ajaxs($where=array(),$field='*',$order='id desc'){
		$pagesize=C('pagesize');
		$counts=M($this->table)->where($where)->select_one('count(id) as counts');
		$page=isset($_REQUEST['page'])?$_REQUEST['page']:1;
		$startRow=$pagesize * ($page - 1);
		$data['list']=M($this->table)->where($where)->order($order)->limit("$startRow,$pagesize")->select_all($field);
		$data['pageshow']=$this->pageajax_show($pagesize,$counts['counts']);
		return $data;
	}
}
?>
